<?php

namespace App\Transformers;


use App\Models\Coach;
use League\Fractal\TransformerAbstract;

class CoachDetailsTransformer extends TransformerAbstract
{

    public function transform(Coach $item)
    {
        return [
            'id' => $item['id'],
            'school_id' => $item['school_id'] ,
            'coachnum' => $item['coachnum'] ,
            'name'=>$item['name'],
            'photo' => $item['photo'],
            'sex' => $item['sex'] ,
            'idcard'=>$item['idcard'],
            'ssms'=>$item['ssms'],
            'mobile' => $item['mobile'],
            'schoolname' => $item->school->name,
            'address' => $item['address'],
            'teachpermitted' => $item['teachpermitted'],
            'evaluationrate' =>  $item['evaluationrate'],
            'evaluateNum' => $item['evaluateNum'],
            'evaluate' => $item['evaluate'],
            'putime' => $item['putime'],
            'description' => $item['description'],
            'style_pic' => $item['style_pic'],
        ];
    }


}
